/**
 * 
 */
package org.compiere.model;

import java.util.Properties;

import org.compiere.util.Env;

/**
 * @author Aslanbek
 *
 */
public class CalloutBSCNetWorkDiag extends CalloutEngine {

	/**
	 * 
	 */
	public String setResponExecName(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) {
		String result = null;
		if (value != null) {
			MBSCNWDDZOList list = new MBSCNWDDZOList(Env.getCtx(), (int)value, null);
			mTab.setValue(MBSCResponsibleExecutor.COLUMNNAME_Name, list.getName());
			mTab.setValue(MBSCResponsibleExecutor.COLUMNNAME_EMail, list.getEMail());
		}
		else{
			mTab.setValue(MBSCResponsibleExecutor.COLUMNNAME_Name, null);
			mTab.setValue(MBSCResponsibleExecutor.COLUMNNAME_EMail, null);
		}
		return result;
	}
	/**
	 * 
	 */
	public String setUserEmail(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value){
		String result = null;
		if(value!=null){
			MUser user = new MUser(Env.getCtx(), (int)value, null);
			mTab.setValue(MBSCResponsibleExecutor.COLUMNNAME_Name, user.getDescription());
			mTab.setValue(MBSCResponsibleExecutor.COLUMNNAME_EMail, user.getEMail());
		}
		return result;
	}
	

}
